Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Adding columns to the browse
After you create the browse you must add columns to it individually. There are three methods you can use to do this:
ADD-COLUMNS-FROM,ADD-LIKE-COLUMNS, andADD-CALC-COLUMN. These are much like the dynamic temp-table methods:ADD-FIELDS-FROM,ADD-LIKE-FIELD, andADD-NEW-FIELD.ADD-COLUMNS-FROM method
The
ADD-COLUMNS-FROMmethod takes a table name (which can be a database table or a temp-table) and an optional list of fields to omit from the browse:
This method returns true if it succeeds and false otherwise.
As with the similar temp-table methods, you can specify the table using its handle or using a character expression that evaluates to its name.
The method creates a column in the browse for every field in the table you pass, except those in the
except-list.ADD-LIKE-COLUMN method
The
ADD-LIKE-COLUMNmethod adds a single column to the browse whose attributes are taken from a field either in a database table that is connected when the procedure is compiled or in a temp-table that is in scope when the method is encountered:
You can also pass an optional second argument that specifies the position of the column within the browse. If you don’t specify the position, the column is added to the end of the column list for the browse.
This method returns the handle of the browse column created. You might want to save off the browse column handle, or you can access it later through the browse handle.
ADD-CALC-COLUMN method
The
ADD-CALC-COLUMNmethod adds a single column to the browse that is not derived from a field in a database table or temp-table. You can use this method to add a field you use to display a calculated value:
This method also returns the handle of the browse column created. You must specify a data type, format, initial value, and label for the column. You can also optionally specify an ordinal position within the list of browse columns. If you don’t specify the position, each new column is added to the end of the list.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |